<html>
<head>
</head>
<body>
<div>
Special cases:
<pre formatcs=1>
MyClass1 MyClass1 = new MyClass1();
class MyClass2 { }
MyClass2 MyClass2 = new MyClass2();
for (MyClass3 var in NS1.MyClass2.Get()) { }
</pre>
<br>
Types1:
<pre formatcs=1>
[MyAttribute1]
class MyClass1 { }
[Attribute]
interface MyInterface1 { }
[Attribute]
struct MyStruct1 { }
[Attribute]
enum MyEnum1 { }
[Attribute]
public class MyClass2 { }
class MyClass3&lt;T1,T2,T3&gt; : MyClass4, MyClass5 &lt; T1 &gt;, MyClass6&lt;MyClass7, T2&gt;, T3
	where T1 : MyClass8, MyClass9  &lt;  T2  , MyClass10   &lt; T3   &gt;   &gt;
	where T3 : T3
{
	class MyClass11 : T1 { }
}

// Generics Memory:
new T1();
T1 var;
typeof(T1);
var as T1;
for (T1 var in arr) { }
public T1 var;
MyClass12&lt;T2&gt; var = new MyClass13&lt;T3&gt;();

// Types Memory:
MyClass1;
MyClass2;
MyClass3;
MyClass4;
MyClass5;
MyClass6;
MyClass7;
MyClass8;
MyClass9;
MyClass10;
MyClass11;
MyClass12;
MyClass13;
MyInterface1;
MyStruct1;
MyEnum1;
</pre>
<br>
Types2:
<pre formatcs=1>
// The following should be recognized as classes
for (MyClass1 xyz in arr) { }
for (MyClass2&lt;MyClass3&lt;MyClass4,MyClass5&gt;,MyClass6&gt;&gt; xyz in arr) { }
for (MyClass7  &lt; MyClass8 &lt; MyClass9, MyClass10 &gt;  , &lt; &lt; MyClass11 &gt; &gt; &gt; xyz in arr) { }
private MyClass12&lt;MyClass13&lt;MyClass14,MyClass15&gt;,MyClass16&gt;&gt; xyz;
private MyClass17  &lt; MyClass18 &lt; MyClass19, MyClass20 &gt;  , &lt; &lt; MyClass21 &gt; &gt; &gt; xyz;
private MyClass22 xyz;
new MyClass23();
new MyClass24 &lt; MyClass25 , MyClass26 &lt; MyClass27 &gt; &gt;() ;
xyz as MyClass28;
xyz as MyClass29  &lt; MyClass30 &lt; MyClass31 &gt; , MyClass32 &gt;&gt; ;
(xyz as MyClass33)
(xyz as MyClass34 &lt; MyClass35 &lt; MyClass36 &gt; , MyClass37 &gt;&gt; )
typeof(MyClass38);
typeof(MyClass39 &lt; MyClass40, MyClass41&lt;MyClass42 &lt; MyClass43 &gt; ) ;

// Memory:
MyClass1;
MyClass2;
MyClass3;
MyClass4;
MyClass5;
MyClass6;
MyClass7;
MyClass8;
MyClass9;
MyClass10;
MyClass11;
MyClass12;
MyClass13;
MyClass14;
MyClass15;
MyClass16;
MyClass17;
MyClass18;
MyClass19;
MyClass20;
MyClass21;
MyClass22;
MyClass23;
MyClass24;
MyClass25;
MyClass26;
MyClass27;
MyClass28;
MyClass29;
MyClass30;
MyClass31;
MyClass32;
MyClass33;
MyClass34;
MyClass35;
MyClass36;
MyClass37;
MyClass38;
MyClass39;
MyClass40;
MyClass41;
MyClass42;
MyClass43;
</pre>
<br>
Types3:
<pre formatcs=1>
// The following should NOT be recognized as classes
MyClass1;
MyClass2&lt;MyClass3,MyClass4&lt;MyClass5&gt;,MyClass6&gt;;
using MyNS1.MyNS2.MyClass7;
namespace MyNS3 { }
namespace MyNS4.MyNS5 { }
public MyClass8() { }
MyClass9() { }
private static MyClass10() { }
MyClass11.Do();
MyClass12&lt;MyClass13&gt;.Do();
// if one day there will be: a < b > c then we will have a problem
if (a&lt; b && b &gt; c) { }
</pre>
<br>
Comments:
<pre formatcs=1>
int x;
/* comment
mmm // 
@"   "
///
// dddd
""
			*/
int x;
// aaaaaaa /// &lt;summary&gt;
int x;
////////// aa
int x;
/// b &lt;summary&gt; a &lt;summary&gt; bb
/// m
/// b // /* &lt;/summary&gt; a */
int x;
</pre>
<br>
Strings:
<pre formatcs=1>
string x = "aaaaa \\ \\\\ \\\\\\ \n \" \\\" \\\\\" \\\\\\\" \\";
string x = @" aa "" \ \\ x
	&gt;		x	\\\ ""
	&lt;		x	bb \";
char x = 'aaa\'';
</pre>
</div>

<script type="text/javascript" src="csharp_formatter_normal.js"></script>
<script type="text/javascript">
findAndFormatCSharp();
</script>

</body>
</html>
